#include <bits/stdc++.h>

using namespace std;

class Solution {
public:
	int maximumDetonation(vector<vector<int>>& bombs) {
		auto is_connected = [&](int o1, int o2) {
			long long dx = bombs[o1][0] - bombs[o2][0],
					  dy = bombs[o1][1] - bombs[o2][1];
			auto res = (long long)bombs[o1][2] * bombs[o1][2] >= dx * dx + dy * dy;
			cout << o1 << ":\t" << o2 << ":\t" << res << endl;
			return res;
		};

		int length = size(bombs);
		vector adj_matrix(length, vector(length, false));
		for (int i = 0; i < length; i++)
			for (int j = 0; j < length; j++)
				if (is_connected(i, j)) adj_matrix[i][j] = true;

		for (auto& vec1 : adj_matrix) {
			for (bool truth : vec1)
				cout << truth << "\t";
			cout << endl;
		}

		int max = 0;
		for (auto& boom : adj_matrix) {
			int res = accumulate(begin(boom), end(boom), 0, [](int cur, bool connect) { return connect ? cur + 1 : cur; });
			if (res > max) max = res;
		};

		return max;
	}

private:
};

int main()
{
	Solution solution;
	return 0;
}
